# -*- coding: utf-8 -*-
"""
Created on 2016/3/23 20:54
@File: domain_search.py
@Author: Liangrong Li
@
"""
pre_word = []
last_word = []
w = 'data'
with open('word-filter.txt') as words:
    for i in words:
        a = w+i
        pre_word.append(a)
        b = i+w
        last_word.append(b)

try:
    with open('domain_pre.txt', 'w') as result:
        for m in pre_word:
            result.write(m)
except Exception, e:
    print e

try:
    with open('domain_last.txt', 'w') as result:
        for n in last_word:
            result.write(n)
except Exception, e:
    print e